home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 8 / QRZ Ham Radio Callsign Database - Volume 8.iso / pc / files / t_sys5 / unixkit.tgz / unixkit.tar / unixkit / tundrvr / README < prev    next >
Text File  |  1991-11-22  |  4KB  |  111 lines

  1. [ tunnel driver - installation instructions and general comments]
  2.  
  3. This is the tunnel driver for routing IP packets over other networks.
  4. In particular it can be used for rfc877 encapsualtion of IP packets
  5. over X.25 - but the kernel level driver just delivers IP packets to
  6. listening processes. The approximate steps for installation of the
  7. driver are as follows.
  8.  
  9. 1. Copy the file if_tun.c and if_tnreg.h to the directory
  10. /usr/sys/netinet. Also make sure that if_tnreg.h appears in
  11. /usr/include/netinet as well - this may occur as a result of the first
  12. copy.
  13. If you are running SunOs 4.0, add a line 
  14. #define SUNOS4
  15. somewhere at the start of /usr/sys/netinet/if_tun.c.
  16.  
  17. 2. Edit the file /usr/sys/{sun,vax,whatever}/conf.c and add these
  18. lines before the start of the cdevsw table. This starts with something
  19. like
  20. ------------------------------------------------------------------
  21. struct cdevsw   cdevsw[] =
  22. {
  23.     {
  24.         cnopen,         cnclose,        cnread,         cnwrite, /*0*/
  25. ------------------------------------------------------------------
  26. The lines to add here are
  27.  
  28. ------------------------------------------------------------------
  29. #include "tun.h"
  30. #if NTUN > 0
  31. int tunopen (), tunclose (), tuncioctl (), tunread (),
  32.                 tunwrite (), tunselect ();
  33. #else
  34. #define tunopen         nodev
  35. #define tunclose        nodev
  36. #define tuncioctl       nodev
  37. #define tunread         nodev
  38. #define tunwrite        nodev
  39. #define tunselect       nodev
  40. #endif
  41. ------------------------------------------------------------------
  42. Then, at the end of the cdevsw table add the following lines- 
  43. ------------------------------------------------------------------
  44.   for bsd or SunOs 3.x :
  45. ------------------------------------------------------------------
  46.     {
  47.         tunopen,        tunclose,       tunread,        tunwrite, /*??*/
  48.         tuncioctl,      nulldev,        nulldev,        0,
  49.         tunselect,      0,              0,
  50.     },
  51. ------------------------------------------------------------------
  52.   for SunOs 4.0 :
  53. ------------------------------------------------------------------
  54.     {
  55.         tunopen,        tunclose,       tunread,        tunwrite, /*??*/
  56.         tuncioctl,      nulldev,    tunselect,      0,
  57.     0,
  58.     },
  59. ------------------------------------------------------------------
  60.  
  61. The ?? should be filled in as appropriate - it is the nth entry in the
  62. table its probably somewhere in the range of 30-50. There is usually a
  63. similar comment for the previous device, just add one to that if this
  64. is the case. Remember this number as it is used later.
  65.  
  66. 3. Edit the file /usr/sys/conf/files and add the line
  67. ------------------------------------------------------------------
  68. netinet/if_tun.c                optional tun
  69. ------------------------------------------------------------------
  70. at somewhere appropriate.
  71.  
  72. 4. Edit your configuration file /usr/sys/conf/MACHINE_NAME and add the
  73. line 
  74. ------------------------------------------------------------------
  75. pseudo-device   tunX
  76. ------------------------------------------------------------------
  77. where X is the number of tunnels you require (1 for each interface
  78. address you require to use i.e. for X.25 1 for each remote connection
  79. you are likely to want at the same time.)
  80.  
  81. 5. run config on your configuration file (/etc/config MACHINE_NAME)
  82. and build the kernel and install it in a bootable place. You may get
  83. some problems with the make. config doesn't always notice #ifdef lines
  84. so there may be a spurious dependency on the sun an the file
  85. ../vax/mptr.h. If you get the message
  86. Directory ../vax: Make: Cannot open.  Stop.
  87. then edit the makefile and remove the line giving this dependency.
  88.  
  89. 6. Construct the devices in /dev/ by running MAKEDEV.tun XX YY where
  90. XX is the major device number (index in the cdevsw found in step 2)
  91. and YY is the number of device you want (this should be the same as
  92. the X in step 4 - but it shouldn't hurt if its more).
  93.  
  94. 7. Thats it - boot up the new kernel and the device should be
  95. runnable.
  96.  
  97. [Note: the following step is not applicable to NOS users.  KA9WSB]
  98. 8. Compile the tunnel daemon (make) and edit a config file. This is
  99. documented in tund.8c and there is an example file.
  100.  
  101. If there are problems, you can try contacting me at one of the
  102. following addresses.
  103.  
  104.     Julian Onions (jpo@cs.nott.ac.uk)
  105.     Computer Science Department
  106.     Nottingham University
  107.     Nottingham, NG7 2RD
  108.     ENGLAND
  109.  
  110.     +44 602 506101 x3595
  111.